import {Component, OnInit} from '@angular/core';
import {Router} from "@angular/router";
import {NzModalService} from "ng-zorro-antd/modal";
import {AuthService} from "@core/service/AuthService";
import {UserInfo} from "@shared/models/UserInfo";
import {MyDiskPageService} from "@core/service/page/MyDiskPageService";
import {DiskPageStatus} from "@core/service/page/DiskPageStatus";

@Component({
  selector: 'app-my-disk',
  templateUrl: './my-disk.component.html',
  styleUrls: ['./my-disk.component.scss']
})
export class MyDiskComponent implements OnInit {
  //当前页面数据
  pageStatus: DiskPageStatus
  userInfo: UserInfo | undefined;

  constructor(
    private router: Router,
    private dialogService: NzModalService,
    private authService: AuthService,
    public myDiskService: MyDiskPageService
  ) {
    this.userInfo = authService.getUserInfo();
    if (!this.userInfo) {
      router.navigate(['/user/login'])
    }
    this.pageStatus = myDiskService.pageStatus
  }

  ngOnInit() {
  }
}
